/**
 * 
 */
package com.google.code.rookery;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.google.code.rookery.converter.InstanceConverter;

/**
 * The TVO property annotations signals that what follows will be used as a property in a TVO class.
 * @author Thom Hehl
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.TYPE})
public @interface FactoryProperty {
  /**
   * The name of the property in the composite class. This
   * value will then be copied to the matching setter. Mandatory.
   * @return the property name
   */
  String  name();

  /**
   * An optional converter to convert one type of object into another.
   * @return the converter or null if not defined
   */
  Class<? extends InstanceConverter> converter() default InstanceConverter.class;
}
